//
//  EmergencySignViewController.m
//  OperationPro
//
//  Created by yaxue wang on 2017/5/3.
//  Copyright © 2017年 展鸿科技. All rights reserved.
//

#import "EmergencySignViewController.h"
#import "EmergencyTable.h"
#import "MessageViewController.h"
#import "EmergencyDetailViewController.h"
@interface EmergencySignViewController ()

@end

@implementation EmergencySignViewController

- (void)viewDidLoad {
    [super viewDidLoad];
     self.title = @"应急签到";
    __block typeof(self) blockself = self;

    [self.navBar setBackAction:^{
        if([blockself.type isEqualToString:@"推送"]) {
            MessageViewController *messVc=[[MessageViewController alloc]init];
            messVc.type=blockself.type;
            [blockself.navigationController pushViewController:messVc animated:NO];
        }else  {
            [blockself backController];
            
        }
        
    }];
    EmergencyTable *emergenctTable =[[EmergencyTable alloc]initWithFrame:CGRectMake(0, 64, WindowWidth, WindowHeight-64)];
    [self.view addSubview:emergenctTable];
    [emergenctTable setCCellSelect:^(NSString *uuid){
        EmergencyDetailViewController *emergencyDetailVC=[[EmergencyDetailViewController alloc]init];

        emergencyDetailVC.uuid=uuid; //@"ba9c81b510c24a09884b839d3cf44508";//uuid;
        [self pushController:emergencyDetailVC];
    }];
 
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
